<%@ page import="java.sql.*,studentportal.*"%>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<table border="1" width="100%">
  <tr>
    <td width="100%">&nbsp;</td>
  </tr>
</table>
<table border="1" width="100%" bordercolorlight="#666666" bordercolordark="#000000">
  <tr>
    <td width="23%">
      <p align="center"><a href="AdminStudentHome.html">Students</a></td>
    <td width="17%">
      <p align="center"><a href="AdminFacultyHome.html">Faculties</a></td>
    <td width="20%">
      <p align="center"><a href="AdminAccountsHome.html">Accounts</a></td>
    <td width="20%">
      <p align="center"><a href="AdminExamsHome1.html">Exams</a></td>
    <td width="20%">
      <p align="center">Notifications</td>
    <td width="20%">
      <p align="center"><a href="Home.html">Home</a>/<a href="Home.html">Back</a></td>
  </tr>
</table>
<%
					
					Connection con=MySQLDriver.getConnection(); 
					Statement st=con.createStatement();
					System.out.println("After Statement");
					String eid=request.getParameter("eid").trim();
					ResultSet rs=st.executeQuery("select * from examination_master where examination_id='"+eid+"'");
					rs.next();
					java.util.Vector v=new java.util.Vector();
					v.add(rs.getString(1));
					v.add(rs.getString(2));
					v.add(rs.getString(6));
					v.add(rs.getString(7));
					v.add(new Float(rs.getFloat(8)));
					//Student stu=(Student)session.getAttribute("Student");
%>
<p align="center">&nbsp;</p>
<form method="POST" action="./AdminExamServlet">
  <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
  S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
  <div align="center">
    <center>
    <table border="1" width="49%" bordercolor="#0000FF">
      <tr>
        <td width="100%" colspan="2" style="font-size: 14pt; font-weight: bold; color: #0000FF">
          <p align="center">Examination Information</td>
      </tr>
      <tr>
        <td width="50%">Exam ID</td>
        <td width="50%"><input type="text" name="eid" size="20" tabindex="1" value="<%=(String)v.elementAt(0)%>"></td>
	  </tr>
      <tr>
        <td width="50%">Exam Name</td>
        <td width="50%"><input type="text" name="ename" size="20" tabindex="2" value="<%=(String)v.elementAt(1)%>"></td>
      </tr>
	  <tr>
        <td width="50%">Exam Type</td>
		 <td width="50%"><select size="1" name="etype" tabindex="3">
			<option>SEMESTER</option>
			<option>YEAR</option>
		</select></td>
        
      </tr>
      <tr>
      <tr>
        <td width="50%">Course ID</td>
        <td width="50%"><select size="1" name="cid" tabindex="3">
		<%
					System.out.println("ss");
					Connection con1=MySQLDriver.getConnection(); 
					Statement st1=con1.createStatement();
					System.out.println("After Statement");
					ResultSet rs1=st1.executeQuery("select * from course_master");
					while(rs1.next())
					{
		%>
						<option><%=rs1.getString(1)%></option>
		<%
					}
					st1.close();
					con1.close();
		%>
          </select></td>
      </tr>
      <tr>
        <td width="50%">Semester ID</td>
        <td width="50%"><select size="1" name="semid" tabindex="4">
		<%
					System.out.println("ss");
					Connection con2=MySQLDriver.getConnection(); 
					Statement st2=con2.createStatement();
					System.out.println("After Statement");
					ResultSet rs2=st2.executeQuery("select * from semister_master");
					while(rs2.next())
					{
		%>
						<option><%=rs2.getString(1)%></option>
		<%
					}
					st2.close();
					con2.close();
		%>
          </select></td>
      </tr>
      <tr>
        <td width="50%">Subject ID</td>
        <td width="50%"><select size="1" name="subid" tabindex="5">
		<%
					System.out.println("ss");
					Connection con3=MySQLDriver.getConnection(); 
					Statement st3=con3.createStatement();
					System.out.println("After Statement");
					ResultSet rs3=st3.executeQuery("select * from subject_master");
					while(rs3.next())
					{
		%>
						<option><%=rs3.getString(1)%></option>
		<%
					}
					st3.close();
					con3.close();
		%>
          </select></td>
      </tr>
      <tr>
        <td width="50%">Exam Starting Date</td>
        <td width="50%"><input type="text" name="exstart" size="20" tabindex="6" value="<%=(String)v.elementAt(2)%>"></td>
      </tr>
      <tr>
        <td width="50%">Exam Ending Date</td>
        <td width="50%"><input type="text" name="exend" size="20" tabindex="7" value="<%=(String)v.elementAt(3)%>"></td>
      </tr>
      <tr>
        <td width="50%">Exam Fee</td>
        <td width="50%"><input type="text" name="exfee" size="20" tabindex="8" value="<%=(Float)v.elementAt(4)%>"></td>
      </tr>
      <tr>
        <td width="100%" colspan="2">
          <p align="center"><input type="submit" value="Update" name="action" tabindex="9"></td>
      </tr>
    </table>
    </center>
  </div>
</form>
<%con.close();%>
</body>

</html>
